home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.src.lzh / relay / Makefile < prev    next >
Makefile  |  1989-12-29  |  5KB  |  170 lines

  1. # makefile for C news relaynews
  2.  
  3. # =()<NEWSARTS = @<NEWSARTS>@>()=
  4. #    AMIGA
  5. #    NEWSARTS = /usr/spool/news
  6. NEWSARTS = News:
  7. # =()<NEWSBIN = @<NEWSBIN>@>()=
  8. #    AMIGA
  9. #    NEWSBIN = /usr/lib/newsbin
  10. NEWSBIN = News:newsbin
  11. # =()<NEWSCTL = @<NEWSCTL>@>()=
  12. #    AMIGA
  13. #    NEWSCTL = /usr/lib/news
  14. NEWSCTL = News:news
  15. # workaround for System V make bug
  16. SHELL = /bin/sh
  17.  
  18. BIN=/bin
  19. NPROC=2
  20.  
  21. # -DVOID=int for libc.h & old lint libraries
  22. #    AMIGA
  23. #    DEFINES= -I../include -I. -DVOID=int -DFLUSHEVERY=6
  24. INCLUDE= /include
  25. DEFINES= -DFJE -DAMIGA -DVOID=int -DFLUSHEVERY=6 -I$(INCLUDE)
  26.  
  27. #    AMIGA
  28. CC = cc
  29. #CC=CC +V
  30. #CC=gcc -ansi -pedantic -Wall -S
  31. #CC=redcc
  32.  
  33. #    AMIGA
  34. #    COPTS= -O # -pg -g
  35. COPTS=
  36. CFLAGS=$(DEFINES) $(COPTS)
  37.  
  38. #    AMIGA
  39. #    DBM = -ldbm
  40. DBM =
  41.  
  42. LIBS= $(DBM) vfprintf.o heapmem.o -lc
  43.  
  44. #    LINT=lint
  45. #    LINTFLAGS=-haz $(DEFINES)
  46. #    LLIBS=-llocal
  47. # I wish I could make lint shut the fk up about some things.  Grrr!
  48. #    LINTFILT=egrep -v '(possible pointer|long assign|can.t take|never used|nnfree|getdate|:$$)'
  49.  
  50. #    PROPTS=
  51. #    P=stpr
  52. #    PP=pp -Tpsc -fR # lazywriter
  53. #    PPBACK=dps | stps # lazywriter
  54.  
  55. #    AMIGA
  56. #    What is LIBSRCS for???
  57. #    LIBOBJS=../libcnews.a
  58. LIBSRCS=
  59. LIBOBJS= /libcnews.lib
  60.  
  61. SRC=relaynews.c active.c article.c caches.c mkdirs.c control.c fileart.c \
  62.     hdrdefs.c hdrcommon.c hdrparse.c hdrmunge.c \
  63.     history.c io.c msgs.c procart.c \
  64.     sys.c transmit.c trbatch.c ihave_no.c amiga.c $(LIBSRCS)
  65. OBJ=relaynews.o active.o article.o caches.o mkdirs.o control.o fileart.o \
  66.     hdrdefs.o hdrcommon.o hdrparse.o hdrmunge.o \
  67.     history.o io.o msgs.o procart.o \
  68.     sys.o transmit.o trbatch.o ihave_no.o amiga.o
  69. NONCFILES= TODO* README ads/README ads/[0-9]* \
  70.     sh/inews sh/tear sh/anne.jones sh/defhdrs.awk \
  71.     sh/realrnews sh/serverrnews makefile
  72. CFILES= $(INCLUDE)/*.h \
  73.     active.h article.h caches.h mkdirs.h control.h cpu.h fileart.h \
  74.     hdrint.h headers.h history.h system.h transmit.h trbatch.h $(SRC)
  75. FILES=$(NONCFILES) $(CFILES)
  76.  
  77. .c.o:
  78.     $(CC) $(CFLAGS) $*.c
  79.  
  80. all: makefile relaynews
  81.  
  82. mkfile: makefile
  83.     sed '/mkfile/d' makefile | mkconv | sed 's/make/mk/g' >$@
  84.  
  85. relaynews: $(OBJ)
  86.     ln $(OBJ) -o $@ $(LIBOBJS) $(LIBS)
  87. #    blink from lib:c.o $(OBJ) to $@ lib $(LIBOBJS) $(LIBS)
  88. #    $(CC) $(CFLAGS) $(OBJ) $(LIBS) $(LIBOBJS) -o $@
  89.  
  90. #    lint: $(SRC)
  91. #        $(LINT) $(LINTFLAGS) $(SRC) $(LLIBS) | $(LINTFILT)
  92.  
  93. #    lint-p: $(SRC)
  94. #        $(LINT) $(LINTFLAGS) -p $(SRC) $(LLIBS) | $(LINTFILT)
  95.  
  96. newsinstall:
  97.     : nothing
  98.  
  99. # bininstall: make directories, install programs
  100. #    bininstall: install
  101. #    install: $(NEWSBIN)/relay/relaynews
  102. #    $(NEWSBIN)/relay/relaynews: relaynews
  103. #        -mkdir $(NEWSBIN)/relay $(NEWSBIN)/inject $(NEWSBIN)/ctl
  104. #        cp relaynews $(NEWSBIN)/relay
  105. #        : needs to be news-owned, setuid -- build looks after that
  106. #        chmod +x sh/* aux/* ctl/*
  107. #        cp sh/* $(NEWSBIN)/inject
  108. #        cp ctl/* $(NEWSBIN)/ctl
  109. #        cp aux/* $(NEWSBIN)/relay
  110. #        cp sh/postnews sh/inews $(BIN)
  111.  
  112. #    TODO.grep: TODO
  113. #        -egrep TODO $(INCLUDE)/*.h *.h *.c sh/* | tr -s " \11" " " >$@
  114. #        -egrep TODO ../lib*/*.[ch] | tr -s " \11" " " >>$@
  115.  
  116. #    v7 v8 v9 usg bsd42:
  117. #        test -d libos && exit 1
  118. #        mv lib$@ libos # or ln -s lib$@ libos
  119. #        make
  120.  
  121. #    print: printc printnonc
  122. #        touch $@
  123. #    printc: $(CFILES)
  124. #        $(PP) $? | $(PPBACK)
  125. #        touch $@
  126. #    printnonc: $(NONCFILES)
  127. #        pr $(PROPTS) $? | $P
  128. #        touch $@
  129. #    distr: $(FILES)
  130. #        (echo relaynews update of `date`; echo ""; bundle $?) | /bin/mail cnews-update
  131. #        touch $@
  132.  
  133. clean:
  134.     rm -f core a.out relaynews *.o
  135.  
  136. # header dependencies follow
  137.  
  138. active.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h $(INCLUDE)/config.h
  139. active.o:        active.h
  140. article.o:        $(INCLUDE)/news.h article.h headers.h
  141. caches.o:        $(INCLUDE)/news.h active.h caches.h transmit.h
  142. mkdirs.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h
  143. control.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h $(INCLUDE)/config.h
  144. control.o:        headers.h article.h caches.h history.h
  145. fileart.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h $(INCLUDE)/config.h
  146. fileart.o:        active.h mkdirs.h headers.h article.h history.h system.h
  147. hdrcommon.o:    $(INCLUDE)/news.h headers.h hdrint.h
  148. hdrdefs.o:        $(INCLUDE)/news.h headers.h hdrint.h
  149. hdrmunge.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h fileart.h headers.h
  150. hdrmunge.o:        article.h hdrint.h
  151. hdrparse.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h headers.h hdrint.h
  152. history.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h $(INCLUDE)/config.h
  153. history.o:        $(INCLUDE)/fgetmfs.h headers.h article.h history.h
  154. hostname.o:        $(INCLUDE)/news.h $(INCLUDE)/config.h
  155. ihave_no.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h $(INCLUDE)/config.h
  156. ihave_no.o:        headers.h article.h caches.h history.h
  157. io.o:            $(INCLUDE)/news.h headers.h article.h
  158. msgs.o:            $(INCLUDE)/news.h headers.h article.h
  159. procart.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h active.h control.h
  160. procart.o:        headers.h article.h history.h system.h
  161. relaynews.o:    $(INCLUDE)/libc.h $(INCLUDE)/news.h $(INCLUDE)/config.h
  162. relaynews.o:    $(INCLUDE)/fgetmfs.h active.h caches.h cpu.h headers.h
  163. relaynews.o:    history.h
  164. string.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h
  165. sys.o:            $(INCLUDE)/libc.h $(INCLUDE)/fgetmfs.h $(INCLUDE)/news.h
  166. sys.o:            $(INCLUDE)/config.h system.h
  167. transmit.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h $(INCLUDE)/config.h
  168. transmit.o:        headers.h active.h article.h system.h trbatch.h transmit.h
  169. trbatch.o:        $(INCLUDE)/libc.h $(INCLUDE)/news.h trbatch.h
  170.